#!/usr/bin/python

import os

def check_pwd(x):
    def wrapper(*args,**kwargs):
        u_pwd = input("please input the passwd:")
        if u_pwd.isalnum():
            print("the passwd lack special charactor")
        else:
            return u_pwd,x(*args)
    return wrapper


@check_pwd
def A():
    os.system('echo "u_pwd"|passwd root --stdin')

@check_pwd
def B():
    os.system('echo "u_pwd"|passwd cy --stdin')

A()
B()
